home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Bus
/
H-L
/
Invoicer.cpt
/
CustHist
< prev
next >
Wrap
Text File
|
1987-05-25
|
4KB
|
188 lines
CLS
CustCode:
CLS
TEXTSIZE (24):TEXTFACE(5)
PRINT:PRINT SPC(7);"CUSTOMER HISTORY"
TEXTSIZE(12):TEXTFACE(0)
INPUT"Customer code ('help' for code list): ",cd$
IF cd$="help" OR cd$ = "h" THEN GOTO ListCodes
IF cd$="quit" OR cd$="q" THEN CLS:LOAD "Open Me First",R
IF LEN(cd$)<>2 THEN BEEP: GOTO CustCode
SecondChk:
CLS
OPEN "Customers B"FOR INPUT AS #1
SecChk:
IF EOF(1)THEN CLOSE #1:GOTO NotHere
INPUT #1,CO$,CN$,ts$
IF CO$=cd$ THEN CLOSE #1:cc$=CN$:GOTO History
GOTO SecChk
NotHere:
CLS
TEXTFACE(1)
PRINT:PRINT" This customer not on file…":FOR m = 1 TO 2500:NEXT:CLS:RUN
History:
OPEN CO$ FOR INPUT AS #1
INPUT #1,BF
CLOSE #1
TEXTFACE(0)
PRINT" Customer: ";SPC(7);
TEXTFACE(1)
IF LEN (CN$) >43 THEN PRINT LEFT$(CN$,43);"…"
IF LEN (CN$) > 43 THEN GOTO Skpt
PRINT CN$
Skpt:
TEXTFACE(0)
PRINT" Balance forward: ";SPC(2);
TEXTFACE(1)
PRINT USING "$#####.##";BF
WINDOW 2,"",(25,75)-(247,280),3
WINDOW 3,"",(25,285)-(247,330),3
YourChoice:
WINDOW 4,"",(252,121)-(477,330),3
BUTTON 1,1,"billed",(20,20)-(200,50),1
BUTTON 2,1,"paid",(20,70)-(200,100),1
BUTTON 3,1,"another",(20,120)-(200,150),1
BUTTON 4,1,"quit",(20,170)-(200,200),1
yc:
WHILE DIALOG(0)<>1:WEND
ButtonPushed =DIALOG(1)
IF ButtonPushed =1 THEN BilledToDate
IF ButtonPushed =2 THEN PaidToDate
IF ButtonPushed =3 THEN GOSUB ShutAll: RUN
IF ButtonPushed =4 THEN GOSUB ShutAll: LOAD "Open Me First",R
ShutAll:
WINDOW OUTPUT 1
CLS
WINDOW CLOSE 2
WINDOW CLOSE 3
WINDOW CLOSE 4
RETURN
BilledToDate:
WINDOW OUTPUT 3
CLS
WINDOW OUTPUT 2
CLS
WINDOW OUTPUT 1
GOSUB CustLabel
TEXTFACE(1):TEXTSIZE(24):PRINT SPC(15);"BILLED TO DATE"
LINE (249,33)-(475,75),,B
TEXTFACE(0):TEXTSIZE(12)
OPEN "Accts Billed" FOR INPUT AS #1
WINDOW OUTPUT 2
CLS
Reedata:
IF EOF(1) THEN ttl
INPUT #1,ts$
INPUT #1,CO$
INPUT#1, db$
INPUT#1, CN$
INPUT#1,IT$
IF CO$<>cd$ THEN Reedata
TEXTFACE(0)
PRINT SPC(1); db$;SPC(8);
TEXTFACE (1)
IT=VAL(IT$)
PRINT USING "$#####.##";IT
tt=tt+IT
IF EOF(1) THEN ttl
GOTO Reedata
ttl:
WINDOW OUTPUT 3
PRINT
TEXTFACE(1):TEXTSIZE(18)
PRINT"TOTAL";
TEXTSIZE(12)
PRINT SPC(9);
PRINT USING"$#####.##"; tt;
tt=0
CLOSE #1
GOTO yc
Finish:
CLOSE #1
PRINT
GOTO NewWndw
PaidToDate:
WINDOW OUTPUT 3
CLS
WINDOW OUTPUT 2
CLS
WINDOW OUTPUT 1
GOSUB CustLabel
TEXTFACE(1):TEXTSIZE(24):PRINT SPC(16);"PAID TO DATE"
LINE (249,33)-(475,75),,B
TEXTFACE(0):TEXTSIZE(12)
OPEN "Accts Recd" FOR INPUT AS #1
WINDOW OUTPUT 2
CLS
Readata:
IF EOF(1) THEN ttl
INPUT#1, ts$
INPUT#1, CO$
INPUT#1,dr$
INPUT#1,CN$
INPUT #1, PR$
IF CO$<>cd$ THEN Readata
TEXTFACE(0)
PRINT SPC(1); dr$;SPC(8);
TEXTFACE(1)
PR=VAL(PR$)
PRINT USING "$#####.##";PR
tt=tt+PR
IF EOF(1) THEN ttl
GOTO Readata
ListCodes:
CLS
Lst:
OPEN "Customers B" FOR INPUT AS #1
WINDOW 2,"",(25,50)-(476,280),3
OpFile:
TEXTFACE(1)
IF EOF(1) THEN CLOSE #1:TEXTFACE(0):GOTO NewWndw
INPUT #1,cd$,CN$,ts$
PRINT cd$;
PRINT" - ";CN$
GOTO OpFile
NewWndw:
WINDOW 3,"",(25,285)-(476,330),-3
BUTTON 1,1,"again",(55,10)-(130,35),1
BUTTON 2,1,"enter info",(192,10)-(267,35),1
BUTTON 3,1,"quit",(329,10)-(404,35),1
WHILE DIALOG(0)<>1:WEND
ButtonPushed = DIALOG(1)
IF ButtonPushed = 1 THEN Lst
IF ButtonPushed = 2 THEN WINDOW CLOSE 2:WINDOW CLOSE 3:RUN
IF ButtonPushed = 3 THEN LOAD "Open Me First",R
CustLabel:
CLS
TEXTFACE(0)
PRINT" Customer: ";SPC(10);
TEXTFACE(1)
PRINT cc$
TEXTFACE(0)
PRINT" Balance forward: ";SPC(5);
TEXTFACE(1)
PRINT USING "$#####.##";BF
PRINT
RETURN